home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
IRIX Base Documentation 1998 November
/
IRIX 6.5.2 Base Documentation November 1998.img
/
usr
/
share
/
catman
/
u_man
/
cat1
/
cord.z
/
cord
Wrap
Text File
|
1998-10-30
|
8KB
|
199 lines
CCCCOOOORRRRDDDD((((1111)))) CCCCOOOORRRRDDDD((((1111))))
NNNNAAAAMMMMEEEE
cord - rearranges procedures in an executable.
SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
ccccoooorrrrdddd prog [option] ... [reorder_file] ...
DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
The _c_o_r_d(1) command can be used to rearrange procedures in an executable
object to correspond with an ordering provided in a _r_e_o_r_d_e_r__f_i_l_e.
Normally, the ordering is arranged to reduce virtual memory paging and/or
instruction cache misses. The reorder file can be produced by the
----ffffeeeeeeeeddddbbbbaaaacccckkkk option to pppprrrrooooffff (see _p_r_o_f(1)). The ----ggggpppprrrrooooffff -_f_e_e_d_b_a_c_k options in
_p_r_o_f can be used to produce a procedure ordering based on the function
call counts. The default reorder file is _p_r_o_g._p_i_x_i_e._f_b (if that does not
exist, _p_r_o_g._f_b is used if _p_r_o_g._f_b exists). You can also hand-optimize
the reorder file by rearranging the procedure entries in the reorder
file.
In the example below, a program _f_o_o is run through _p_i_x_i_e(1) which
generates foo.pixie. The instrumented executable is run and _p_r_o_f is used
to produce a feedback file from the profiled data. _C_o_r_d is then used to
reorder the procedures in _f_o_o, generating a new binary foo.cord.
pixie foo
foo.pixie
prof -pixie -feedback foo
cord foo foo.pixie.fb
The degree and specifics of procedure rearrangement depend on the data
produced by the profiled runs of the executable. The more closely these
profiled runs approximate the actual use of the executable, the closer to
optimal the resulting rearrangement will be. Design your profiled runs
accordingly.
Multiple reorder files can be specified in the command line. The first
reorder file has the highest priority in rearranging the ordering. This
feature can be used to improve performance in different program phases,
if the multiple feedback files are generated by executing different
phases of the program.
The _c_o_r_d command accepts these options:
----mmmmeeeerrrrggggeeee _m_e_r_g_e_f_i_l_e
Specifies the "merged" reorder file. The final procedure
ordering is listed in this file. When multiple reorder files
are specified in the command line, the file represents a merged
ordering of those files. When only one reorder file is
provided, the final order may still be different from specified
in the reorder file. The reasons can be to workaround CPU bugs,
procedures not specified in the reorder file, or procedures
tied together by semantic constraints.
PPPPaaaaggggeeee 1111
CCCCOOOORRRRDDDD((((1111)))) CCCCOOOORRRRDDDD((((1111))))
----oooo _o_u_t_f_i_l_e
Specifies the output file. If this option is not specified,
_p_r_o_g._c_o_r_d is used.
----tttt Prints a report of procedures tied together (procedures that
cannot be separated, regardless of other ordering
considerations). This essentially always means the procedures
are hand-written assembler. If procedures cannot be separated
because one falls thru into another or has some other special
non-branch connection an MMMM (to suggest _m_e_r_g_e_d procedures) is
printed on the report line. If procedures cannot be separated
because one explicitly branches into another, the letter BBBB is
printed on the report line. If both characteristics apply then
both letters are printed. If a sequence of procedures (more
than two) are tied together, then the second and subsequent in
the sequence show a blank name as the first procedure name.
Sample output:
Note: _sproc tied to _sprocsp MB
Note: tied to _nsproc MB
----vvvv Prints verbose information. This includes listing procedures
considered part of other procedures and therefore cannot be
rearranged (these are basically assembler procedures that may
contain relative branches to other procedures rather than
relocatable ones). The listing also shows conflicts between
procedures in the binary and in the reorder file.
----BBBB For old 32bit ABI binaries with more than 64K procedures (this
is a very exceptional case) this option results in a more
certain correct update of the ._m_d_e_b_u_g section data. The
._m_d_e_b_u_g section is used by debuggers: it does not affect
program execution. Do not use this option unless you know
positively you have more than 64K procedures in the old 32bit
ABI binary being _c_o_r_ded.
DDDDIIIIAAAAGGGGNNNNOOOOSSSSTTTTIIIICCCCSSSS
The message
Warning: Use cord -v to see procedures in binary that are not in
feedback file.
means that the feedback file does not list every procedure in the binary.
The message
Warning: Use cord -v to see procedures in feedback file that are not
in binary.
means that the feedback file lists procedures that do not exist in the
binary.
PPPPaaaaggggeeee 2222
CCCCOOOORRRRDDDD((((1111)))) CCCCOOOORRRRDDDD((((1111))))
These are normally harmless warnings, but if you are not expecting any
name mismatches, rerun cord with the ----vvvv option to see what procedures
mismatched.
FFFFIIIILLLLEEEESSSS
/usr/bin/cord
SSSSEEEEEEEE AAAALLLLSSSSOOOO
prof(1), pixie(1)
NNNNOOOOTTTTEEEESSSS
For C++, feedback files input to _c_o_r_d normally have the mangled C++
function name. _c_o_r_d matches the procedure names from a feedback file
against both the mangled or unmangled procedure names (as extracted from
the debugging information) and accepts a match on either (when combined
with a match against the base file name (the file with all path prefixes
stripped off)). The unmangled name _c_o_r_d uses does not have a class name
prefix, so the unmangled form is not very safe to use.
Inlined functions cannot be touched by _c_o_r_d: the non-inlined procedures
are all that can usefully be _c_o_r_ded.
PPPPaaaaggggeeee 3333